//
//  BaseViewController.m
//  项目三
//
//  Created by rimi1 on 2016/12/7.
//  Copyright © 2016年 Wangxingqian. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.navigationBar];
}

#pragma mark - respondsTo...

- (void)respondsToLeft:(UIButton *)sender {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)respondsToRight:(UIButton *)sender {
    
}

- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

#pragma mark - get

- (NavigationBar *)navigationBar {
    
    if (!_navigationBar) {
        
        _navigationBar = [[NavigationBar alloc] initWithFrame:CGRectMake(0, 0, kWIDTH, 64)];
        [_navigationBar.left setImage:[UIImage imageNamed:@"返回"] forState:UIControlStateNormal];
        _navigationBar.backgroundColor = kCOLOR_RGB(106, 200, 248, 1);
        [_navigationBar.left addTarget:self action:@selector(respondsToLeft:) forControlEvents:UIControlEventTouchUpInside];
        [_navigationBar.right addTarget:self action:@selector(respondsToRight:) forControlEvents:UIControlEventTouchUpInside];
        
    }
    return _navigationBar;
}

@end













